|
Hi,
I'm new to vb.net, i was working on a college project, its just like a notepad.
similar to notepad, now i want to save a file as html file and i don't know how to do it. can any one help me.
Thanks in advance.
|
|
|
|
|
To save a file as html, just add the html extension to the file name. An html file is just a regular text file. Make sure that the encoding you use for the file is the same as specified in the html code.
What is it that you are going to write to the file? Do you have the html code, or do you have a text that you want to turn into html code?
---
Year happy = new Year(2007);
|
|
|
|
|
|
Does anyone know how to create a listview like the one used in Outlook 2003/2007 with expandable levels.
|
|
|
|
|
This is all I could find: Outlook Bar and Outlook Style Sidebar.
They're both in C# though.
Trinity: Neo... nobody has ever done this before.
Neo: That's why it's going to work.
|
|
|
|
|
Thanks for that but I was thinking about the listview on the right hand side of the screen in outlook - Inbox.
|
|
|
|
|
I don't use Outlook, so I'm not exactly sure what you are talking about. But I think it's just a regular ListView.
Trinity: Neo... nobody has ever done this before.
Neo: That's why it's going to work.
|
|
|
|
|
Can you add collapsable levels to a standard listview?
|
|
|
|
|
Sorry, that would be a TreeView. Like I said, I don't use Outlook so I wasn't sure what you were talking about.
Trinity: Neo... nobody has ever done this before.
Neo: That's why it's going to work.
|
|
|
|
|
I currently over do the redudancy checks in my code such as If Not IsNothing(variable) AndAlso If Not IsDBNull(variable) Then and I am wondering when and where the various types of "Nothing" occur.
When a value is sent to the database does it see "Nothing" as "NULL"?
When a value is returned from the DB does the code see "DBNull" as "Nothing" or "Null"?
Just curious, I dont want to type more than I have to.
Cleako
|
|
|
|
|
a db knows nothing about 'nothing' it knows only about 'null'
if are reading from a db you only need to check 'isdbnull' which is a function that checks if the value equals 'null'
|
|
|
|
|
When communicating with a database use DBNull to indicate that the value of the column should be null (or Nothing in VB).
The reason for this is that there is to distinguish two different types of nullness. For example if you have a query and use ExecuteScalar to get a result you need to distinguish between Nothing (or null in C#) and DBNull . Nothing means that your query return no results. DBNull means that the query returned a result, and that result was null . (i.e. the value of the column was null ).
|
|
|
|
|
To bring some order in the contradictory replies...
Null in VB is the same as System.DBNull , and is how a database null value is represented when it's handled in the code.
Nothing in VB is the same as null in most other languages, and is the value of a reference that isn't referencing any object. This has nothing to do with the database.
---
Year happy = new Year(2007);
|
|
|
|
|
I have a treeview as a menu in my Mdi form. I am seting all form locations to the right of the menu. When I minimize a form it goes behide the treeview control. How do I move the minimized form over to the right so I can see it. Any help will be greatly appreciated
|
|
|
|
|
MDI Child forms are rendered inside another control on the Parent form. This control is called the MDIClient. Search the Controls collection of the MDI Parent form and you can get a reference to the Client control. Once you have the reference you can manipulate the control just like any other control you drop on a form, even move and resize it so it leave you room on the left side of the MDI Parent form for your TreeView control.
For Each c As Control In Me.Controls
If TypeOf c Is MDIClient Then
Dim mdic As MdiClient = DirectCast(c, MdiClient)
mdic.Dock = DockStyle.None
mdic.Anchor = AnchorStyle.None
mdic.Location = New Point(20, 20)
mdic.Size = New Size(200, 200)
Exit For
End If
Next
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hi All,
is it possible to search & find a specific MAC address of NIC card without knowing the IP address or any other details in VB .net?
B Regards
Ajith
Ajith
|
|
|
|
|
No, there isn't. If you can provide some kind of detail about the target machine, there's no way for your code find that specific machine. You're best bet would be the IP address. But, looking up the MAC address using the IP only works if the machine is on the same segment as the one looking up the MAC. If there is a router between you and the target machine, you'll end up getting the MAC address of the near-side of the router, not the machine you're trying to resolve.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hi everyone, i am not sure if this is posible but i am asking anyway.
I am building an application that reads from a database and fills a dataset.
each time i click a next button in my program i am able to move to the next record..my coding works fine and everything but there is a lot of records.. i have a find function that finds any particular data in the database and thats fine too...but...
what i need is, how do i get my program to traverse through all the records by clicking and holding down the mouse pointer on my next button. that is, when i click and hold down the mouse pointer on the next button it continues showing the next record until i release the mouse pointer..
I hope this information was clear enough..please help..
Thanks in advance..
|
|
|
|
|
have you tried using the mousedown and mouseup events? put loop in the event checking a flag that is turned off by the mouseup event
----------------------------------
**mousedown event**
mbMouseIsDown=true
do while mbMouseIsDown and not eof
'get next record
'display record
application.doevents 'make sure form shows each record and windows can do some other stuff
loop
mbmouseisdown=false 'incase eof was hit
-----
**mouseup event**
mbmouseisdown=false
|
|
|
|
|
How does one make use of high quality icons in .Net?
I created my own icons which are of a high quality but when I use them in my winform they turn to moosh!
See sample here[^]
My icon files are 248 x 248 pixels, 96dpi, 32Bit Depth
you can't forget something you never knew...
"Watching Migthy Joe Young made me hate my life..................................I want a gorilla!" A. Havemann
|
|
|
|
|
It' because you are using a large icon to show as a small icon. Try resizing your icon to about 16x16 or 32x32 pixels, that should help.
If you need a good program, I would suggest Icon Sushi.
Trinity: Neo... nobody has ever done this before.
Neo: That's why it's going to work.
|
|
|
|
|
Hey guys,
I've tried looking everywhere and I can't seem to find a solution. Basically, I want to change the inside "box" of an MDI parent form (where an MDIChild can go) and round the corners there. I tried drawing a "border" around the MDIChild and forms, I also thought I could set the background colour to transparent of the MDI Parent, though this didn't work.
If someone could point me in the right direction or let me know it cannot be done, that would be great.
Thanks,
Daniel
|
|
|
|
|
Hi Daniel,
I'm not sure it is possible to achieve what it is you are trying do, but I do have a bit of past experience with MDI forms.
I originally wrote an application where I wanted to change the backround image of the MDI form. This is not possible by setting the forms "BackgroundImage" property. I found that the MDI form has a control on it that handles all the displaying of child forms. It is this control that I had to alter the background image property of.
Below is a snippet of code I used to achieve this, perhaps you can manipulate the MDI form control in a similar fashion to what I did to achieve your rounded corners:
For Each Mdi_display As Control In Me.Controls
If TypeOf (Mdi_display) Is MdiClient Then
' Set colour to white
Mdi_display.BackColor = Color.White
' Centre the image
Mdi_display.BackgroundImageLayout = ImageLayout.Center
' Set background image
Mdi_display.BackgroundImage = My.Resources.Main_background
Mdi_display.Refresh()
' All done!
Exit For
End If
Next
Regards,
Martin
|
|
|
|
|
Hi Martin,
thanks for that. Works great for a background image (which I might add in later, looks better than the grey and much nicer than doing it the way I was fiddling with before). Unfortunately, the client area still has a square border around it :/
|
|
|
|
|
Best way to send xml data from one location to another..
We need to serialize the data.
Is it necessary.
If we do that tags will got change.
|
|
|
|