|
Look at the System.IO.File and System.IO.Directory namespaces where you will find things like
System.IO.Directory.Exists(myFolder)
and
System.IO.Directory.Create(myFolder)
Steve Jowett
-------------------------
Sometimes a man who deserves to be looked down upon because he is a fool, is only despised only because he is an 'I.T. Consultant'
|
|
|
|
|
hi all ,
How to get the MAC address
Is there any need to create a new class??
please explain me in detail with coding.
i vl be thankful to u .
regards,
saravan
|
|
|
|
|
I'm not 100% on this, but I'm pretty sure you can do this through WMI.
"Every time Lotus Notes starts up, somewhere a puppy, a kitten, a lamb, and a baby seal are killed.
Lotus Notes is a conspiracy by the forces of Satan to drive us over the brink into madness. The CRC-32 for each file in the installation includes the numbers 666." Gary Wheeler
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Coo
|
|
|
|
|
Your should try Googling your question[^]before you post them here.
Steve Jowett
-------------------------
Sometimes a man who deserves to be looked down upon because he is a fool, is only despised only because he is an 'I.T. Consultant'
|
|
|
|
|
Thanks Steve, that was brilliant.
|
|
|
|
|
In my Application VB.Net and I am going to cerate combo box,
It is behavior like a windows O.S using run command.
Combo Box is having some data many rows,
If user type “c” it is come listed “c” order word
Franics K Antony
|
|
|
|
|
Check out the articles for the autocomplete comboboxes.
"Every time Lotus Notes starts up, somewhere a puppy, a kitten, a lamb, and a baby seal are killed.
Lotus Notes is a conspiracy by the forces of Satan to drive us over the brink into madness. The CRC-32 for each file in the installation includes the numbers 666." Gary Wheeler
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Coo
|
|
|
|
|
Hi ,
i want this 'Datatype' property as combobox in propertygrid .
-- Datatype
-- Date (Sub Property)
-- Text (sub Property)
-- Number (sub Property)
--Format -
On selecting type of sub-property in combobox the things should be appear in next property ' Format '
if Date is selected ,' dd-mm-yyyy ' should appear .
If Text is selected , nothing should appear.
if NUmber is selected,' 12345 ' should appear in Format property .
Vb8.0
|
|
|
|
|
Try this format
dd-MMM-yyyy
Franics K Antony
|
|
|
|
|
Try setting your Property DataType as an Enum. For example :-
Enum DataTypes<br />
Date=1<br />
Text=2<br />
Number=3<br />
End Enum<br />
<br />
Property DataType As DataTypes<br />
Get<br />
'Your code here<br />
End Get<br />
Set(ByVal Value As DataTypes)<br />
'Your code here<br />
End Set
Steve Jowett
-------------------------
Sometimes a man who deserves to be looked down upon because he is a fool, is only despised only because he is an 'I.T. Consultant'
|
|
|
|
|
Thanks
Here it's not taking Date as a type of enum . Rising error 'at the place of Date
" Statement cannot appear within a enum body " .
|
|
|
|
|
Sorry, the example should have read :-
Enum DataTypes<br />
[Date]=1 '<--- Note the square brackets<br />
Text=2<br />
Number=3<br />
End Enum<br />
<br />
Property DataType As DataTypes<br />
Get<br />
'Your code here<br />
End Get<br />
Set(ByVal Value As DataTypes)<br />
'Your code here<br />
End Set
Steve Jowett
-------------------------
Sometimes a man who deserves to be looked down upon because he is a fool, is only despised only because he is an 'I.T. Consultant'
|
|
|
|
|
Thanks ,
Now i am able to show the Datatypes .
Now if i select the DataType "Date" then in Text property of Propertygrid , I want to show the datetimepicker .If not i want to show nothing .
For this i used ....
Public Class MyDate<br />
Inherits UITypeEditor<br />
Dim CustomDate As DateTimePicker<br />
Public Overrides Function EditValue(ByVal context As System.ComponentModel.ITypeDescriptorContext, ByVal provider As System.IServiceProvider, ByVal value As Object) As Object<br />
CustomDate = New DateTimePicker<br />
CustomDate.Format = DateTimePickerFormat.Custom<br />
CustomDate.CustomFormat = "d-MMM-yyyy"<br />
CustomDate.ShowUpDown = True<br />
CustomDate.Show()<br />
Return MyBase.EditValue(context, provider, value)<br />
End Function<br />
Public Overrides Function GetEditStyle(ByVal context As System.ComponentModel.ITypeDescriptorContext) As System.Drawing.Design.UITypeEditorEditStyle<br />
Return UITypeEditorEditStyle.DropDown<br />
End Function<br />
it is showing the dropdown ,but not getting the Datetimepicker .
After selecting the date i want to show in Text Property .
For this what i have to follow ??????????
VB 8.0
|
|
|
|
|
Does any body know how to change to height of the textbox?
Do we have to use any API's to do that?
Any idea or link??
|
|
|
|
|
Hello,
There is no option to change the height of TextBox in .Net. But,
there are other options using which you can change the height.
1. You can set the 'MultiLine' property to True. However, this will
cause the text to wrap into multiple lines.
2. Another option is to increase the font of the Textbox. This will
automatically set the height of the Textbox.
I hope this answers your query.
Regards,
Allen
Allen Smith
Software Engineer
ComponentOne LLC
www.componentone.com
|
|
|
|
|
Hello every one
I am having a VB 2005 application and using “DrawString” to print a bill.
I want is to print the amount in floating point format, with decimal point like “56.00” instead of “56”
I am using floating points variables but when I am changing it into string, to sent it for printing “.00” will is lost
Also I wanted the numeric columns to be right aligned which I am not able to do
Can any one give me a idea how to do it..
Regards
Nishkarsh
|
|
|
|
|
Convert the value to a string format in the DrawString Method:
DrawString(Format(value,"0.00"),...)
This will ensure the format you want.
I don't speak Idiot - please talk slowly and clearly
|
|
|
|
|
Thanks for ur help. It is working.
Any idea how to align the text to right?
The numbers I am printing for amount should be right aligned.
In case of DrawString i can just tell the starting, i.e. only the left most point. How do I do that?
|
|
|
|
|
To align the text you have to set up a StringFormat object:
Dim sf As New StringFormat<br />
sf.Alignment = StringAlignment.Far<br />
sf.LineAlignment = StringAlignment.Center<br />
<br />
DrawString(Format(value,"0.00"),fnt, Brushes.Black,rectF,sf)
(I cant remember if the LineAlignment and Alignment properties are around the right way but a little trial and error will sort this out.)
Cheers
I don't speak Idiot - please talk slowly and clearly
|
|
|
|
|
To format a number as money use: YourDecimalOrFloatOrDoubleOrWhatEver.Tostring("F")
If you mean columns in a datagrid, you should explore the possibilities of the TableStyle.
My advice is free, and you may get what you paid for.
|
|
|
|
|
|
I am not very clear about what do u want to know, i will tel u what i got out of your question
1 U want to have a right click event.. If so then every object has a right click event handler associated you can go to the codes and select the object and then right click the event handler will come
2 U want to have a menu coming on right click of an object then use ContextMenuStrip
Hope this helps u
Good luck
|
|
|
|
|
You need to add an event handler for MosueDown to for your control, then test to see which mouse button is pressed. For example:-
Private Sub myControl_MouseDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles myControl.MouseDown<br />
If e.Button = Windows.Forms.MouseButtons.Right Then<br />
'Your code here<br />
End If
Steve Jowett
-------------------------
Sometimes a man who deserves to be looked down upon because he is a fool, is only despised only because he is an 'I.T. Consultant'
|
|
|
|
|
it is possible,,running Reporting services2005(rdl) from VB aplikasi Without IIS??
|
|
|
|
|
Colleagues,
Are there controls for VB6 that have the visual properties of a shape and line controls, and also have better mouse support, so that they can be made more interactive?
I’m writing an application that displays a process diagram. I’d like to add things like ToolTips and to make some elements on the diagram clickable.
I know that I can put a label on a shape and it would provide the mouse support that I need. It would work for square-ish shapes, but it doesn’t work well for circles.
- Nick
|
|
|
|