What part of the message box change color ? If you are talking about the actual form part i dont think you can do that... On the other hand you could create your own custom message box which you could do that with
HaloZa
Posts
-
Help with Message Box Colors -
help meNot that hard
openFile.Filter = "adobe(*.pdf) |*.pdf|document(*.doc) |*.doc|jpeg(*.jpg) |*.jpg"
-
Working with datesWith the day, month and year being inserted separately ... it can be easy to check. some normal logic You will ask the year first because of leap years and stuff. Next the month will be enetered in
if EnteredMonth > 0 and EnteredMonth < 13 then 'month is a correct month else 'month is not correct end if
then when u know the month you can demine if the month has 30/31/28 or 29 days and the day can be checked to see if it falls in the bounds here is just a basic layout that you can change to suit your variables ect .. i think that more than explains it how i would go about itif year = leapyear then else ' not a leap year if month = 4 or month = 6 the 'all the months that have 30 days if enteredday > 0 and enteredday < 31 then 'date is correct else 'error end if end if if month = 5 or month = 3 then 'all the months that have 31 days if enteredday > 0 and enteredday < 32 then 'date is correct else 'error end if if month = 2 then 'month is feburary end if end if end if
-
how i can redefine stringWhat is it that you are trying to do? if you just want to change what the string is equal to then dim s as string s = "hello" s = "world"
-
How can I Insert a .swf file in my formthe easyest way of doing it is adding a webpage object. create a simple html page that loads the swf and then load the html page into the webpage object. in vb6 it used to be webpage object.navigate(Path) not sure about .net
-
how to overwrite the whole text file?FileName is a string ... and is the file you are wanting to open/create/overwrite so if the file and path is c:\bla.txt then Dim f As New FileStream("c:\bla.txt", FileMode.Create, FileAccess.Write, FileShare.Write) Dim r As New StreamWriter(f) dont forget to close the streamwriter and filestream with FileStream.close and StreamWriter.close
-
how to overwrite the whole text file?You can use the fileStream * * *
Dim f As New FileStream(FileName, FileMode.Create, FileAccess.Write, FileShare.Write) Dim r As New StreamWriter(f)
All the parameters with *'s above them can be changed to diffrent options such as reading or writing ect. -
Please help me!!! Web Buttonnot sure adzactly but in vb6 you used the shell command If you search in the object brower for shell the only 1 that pops up is Microsoft.VisualBasic.Interaction.Shell(String, [Microsoft.VisualBasic.AppWinStyle], [Boolean], [Integer]) As Integer Try searching msdn or google for a vb.net version hope this helps a bit
-
Custom Control Propertygrid helpAfter searching many sites trying to find a free custom propertygrid / propertylist i have come up empty handed, there are a few for c++ but nothing free for vb.net. I reason i am looking for a free propertygird is because i want to use it in a open source project i am working on. So i decided to have a go at creating one myself... this being my first custom control that i have tried to create its proving to be a chalange. Ok any anyways lets see if anyone can help me with a few problems. I have a collection for Categories and a collection for Entries. Cateogies are like the headers as such with the + - in the propertygrid The entry collection is a object. I then set the object to say ie a textbox entry or a progress bar entry... This has all gone well so far. Problem/Suggestion 1 I basically draw the lable on the left, value on the right using drawstring. When i click on an entry i then dynamically add a textbox basically the size of the value side. I set the focus to the textbox. Set the value of the textbox and hide the border amoungst other things. Is this the best way of doing this? This method works, but seems a bit clumsy when font size changes. I was thinking that maybe instead i need to capture keypresses and use draw string to draw changes unstead of using a textbox. Problem/Suggestion 2 I am going to use the render part of controls to draw the progressbar and buttons. But a control i am slightly lost with adding as an entry is a combobox. I can add the combobox like i did with the textbox above but i cant resize the combobox small enough to the size i would like it without it screwing up. Using the renderer i can draw the button for the combobox but yea i dont know how to draw the actuall box part. I started to experiment with adding a usercontrol with say a listbox and then showing that as the drop down part. Does any 1 have any suggestions on this? Problem/Suggestion 3 I supose i will at some stage want to show tool tips for half hidden lables or values ... any one know where to begin on this? if u would like to see what it sort of looks like atm http://gtools.sourceforge.net/pg.JPG the horrible choise of colours is just to see where things are drawn Thanks
-
Windows FormsThats for version 1 and 1.1 but in 2 i have noticed that u can do it the old fationed way like in vb6 where u dont have to do the whole Dim newForm As New Form2. u can just newForm.Show().
-
a realy simple question about collectionsi didnt think i needed to add that code as well
Public dparmor As new dpGenerals
will thats the line there ... then iedparmor.section(0).keys(0).key dparmor.section(0).section(0).key dparmor.section(0).section(0).section(0).key
but i cant get the add to work as mentioned above, the adding of a section works cus it Class dpGenerals (add). But the property dpGenerals.Section is a collection of the type section, so i cant call the dparmor.section.addbla(). I just dont know how to convert the code to be able to call that fucntion addbla. I dunno if that makes it any clearer ? -- modified at 5:50 Saturday 11th March, 2006 i just figured it out ... made 2 changes and works now :/ -
a realy simple question about collectionsok this is starting to drive me insane :( . I know its realy simple but for the life of me i cannot figure out how to do it. This is my code.
Public Class dpGenerals Inherits System.Collections.CollectionBase Private m_oSections As Sections Public ReadOnly Property Section(ByVal Index As Integer) As Section Get Return DirectCast(List(Index), Section) End Get End Property Public Function Add(ByVal key As Integer, ByVal value As String, ByVal sec As String) As Boolean Try Dim oSection As New Section oSection.key = key oSection.value = value oSection.sec = sec List.Add(oSection) Return True Catch E As Exception Return False End Try End Function Public Function Add(ByVal oSection As Section) As Boolean Try List.Add(oSection) Return True Catch E As Exception Return False End Try End Function End Class Public Class Sections Inherits System.Collections.CollectionBase Private m_oSections As Sections Private m_key As Integer 'Default Public ReadOnly Property Sections(ByVal Index As Integer) As Section Get Return DirectCast(List(Index), Section) End Get End Property Public ReadOnly Property Keys(ByVal Index As Integer) As key Get Return DirectCast(List(Index), key) End Get End Property Public Function Addbla(ByVal key As Integer, ByVal value As String, ByVal sec As String) As Boolean Try Dim oSection As New Section oSection.key = key oSection.value = value oSection.sec = sec List.Add(oSection) Return True Catch E As Exception Return False End Try End Function End Class Public Class Section Private m_sec As String Private m_type As Integer Private m_key As Integer Private m_value As String Private m_keys As Keys Private m_sections As Sections Public Sub New() MyBase.New() m_keys = New keys() End Sub Public Property sec() As String Get Return m_sec End Get Set(ByVal value As String) m_sec = value End Set End Property Public Property type() As Integer Get