
Ace Master
Avatar/Signature-
Posts
140 -
Joined
-
Last visited
Content Type
Profiles
Forums
Blogs
Events
Articles
Resources
Downloads
Gallery
Everything posted by Ace Master
-
somebody shoot me.... thanks
-
I have a timer control on my form and I whant 2 actions each 2 seconds for example : start form > picturebox1.picture = "image1" after 2 sec. :picturebox1.picture = "image2" after 2 sec. picturebox1.picture = "image1" after 2 sec. picturebox1.picture = "image2" etc... I have a slution ..but is a little complicated.Must be a simple way to do that. thanks
-
hi.....don't be mad :) I start using vb for 3 weeks.. :) I was thinking with a beer in my hand......curios......and I realized that I can use a singe label for all my dots. All I need is a function, and I call that function with parameters for location and text from text file. it seams so easy......I will try it tomorow soon...
-
let me tell you why I whant that. I have some small pics (dots) over the large pic (map) , and for each pic I have a mouse_move for making visible a label next to the pic of course. Those pics are put dinamicaly and with the same values I put the labels.(+20 x and +20 y) to be a little under the dot ) The problem apears when a dot is almost out of the main pic.If this happens th label is 90% out of the main pic, and I need something to make the label stay on the map but (the entire label)...next to the dot I hovered on. I write that code to do that ..but it has 30 lines of code :) ...and this just for one dot.Imagine my source code for all labels...they are at least 25-30 of them. I will try your way .... thanks
-
It is a way for reducing this code ..maybe like 5 lines on something ??? because this is just for one image...but i have 30 of them.....and I really don't whant to multiply this code 30 times for each image.. I'm trying with a for..and can't make it work. If (vals1(1) > 1) Then If vals1(2) > 510 Then ianca.Location = New Point(vals1(1) + 16, vals1(2) - 80) End If End If If (vals1(1) > 640) Then If vals1(2) > 35 Then ianca.Location = New Point(vals1(1) - 140, vals1(2) + 16) End If End If If (vals1(1) > 640) Then If vals1(2) > 500 Then ianca.Location = New Point(vals1(1) - 139, vals1(2) - 79) End If End If
-
hi.. I use my own imaginiation and I get it working wery well: Line = Replace(Line, vbCrLf, vbTab) vals = Line.Split(vbTab)
-
yes yep... :) ..now is perfect... you can tell me please what I need here for extract the "space" and the "new line" from that text? Right now is working for space split ..but don't know how to add other split for new line (enter) this is my code: Dim sr As New System.IO.StreamReader("poz.txt") Dim Line As Object Dim vals() As Object Dim space As String = " " Line = sr.ReadToEnd vals = Line.Split(space) vals = Line.Split(vbCrLf) sr.Close() with this code I recieve " Index was outside the bounds of the array." because of the second vals split (vbCrLf)
-
Const FilePath As String = "C:\month.txt" Dim sr As New System.IO.StreamReader(FilePath) Dim lines As Integer Dim Vals As New ArrayList Dim str As String Do str = sr.ReadLine() lines += 1 Loop While (Not str = "") lines -= 1 sr.Close() sr = New System.IO.StreamReader(FilePath) For jump As Integer = 1 To lines - 6 sr.ReadLine() Next For i As Integer = 0 To 5 Vals.Add(Val(sr.ReadLine)) Next I close the file with sr.close() ... and is not working later edit : I did it. Wrong placement of the close() :)
-
big problem ...big problem... I want to make refresh of the chart each 30 seconds and I made a button to simulate a refresh and can�t access the file anymore if the application is still open. I can't change the values in the text file, the only way to do that it is if I close my app� It is a way to write into the file again if the app is open?
-
I know that is not the best way for doing this... I want just the last 6 months...I don't care what day is today (or year) Just to know what month is current and to subtract the last 5 from it. This is my code... :) Dim months(150) As String 'Stores the last 6 months counting from today Dim m As Date Dim ms As New TimeSpan 'TimeSpan you want For month As Integer = 0 To 150 m = Date.Now ms = ms.FromDays(month) 'Subtract the month one by one with 30 days m = m.Subtract(ms) 'Subtract the number of month specified months(month) = Format(m, "MMM ") Next msgbox(0) > return october msgbox(30) > return september ...and so on...
-
that's bad.... :(
-
something weird.. I can use the code you give me for months chart , because : ts = ts.FromDays(day) I can't use ts.FromMonths(mon) I will try to make a trick...
-
is ok now I really appreciate your effort for helping me. Thanks a lot.
-
i did it i did individualy :) Dim d1 As Date = Date.Now() Dim d2 As Date = Date.Now() Dim d3 As Date = Date.Now() Dim ts1 As New TimeSpan Dim ts2 As New TimeSpan Dim ts3 As New TimeSpan Dim MyStr1 As String Dim MyStr2 As String Dim MyStr3 As String ts1 = ts1.FromDays(0) '0 days d1 = d1.Subtract(ts1) 'Subtract the 0 days from the 'd' Date ts2 = ts2.FromDays(1) '1 days d2 = d2.Subtract(ts2) 'Subtract the 1 days from the 'd' Date ts3 = ts3.FromDays(2) '2 days d3 = d3.Subtract(ts3) 'Subtract the 2 days from the 'd' Date MyStr1 = Format(d1, "dddd") MyStr2 = Format(d2, "dddd") MyStr3 = Format(d3, "dddd") MsgBox(MyStr1) MsgBox(MyStr2) MsgBox(MyStr3) is quite hard but at least is working .... I have three variables to put in my chart. Now going to all seven..and the same for months. uf.....
-
hi. the code you give is good..but is like I did before...I can see only in msgbox I whant in my chart when I put the name of columns to put something like that: Dim Sales2(,) As Object = New Object(,) _ {{"stuff", "Param 1"}, _ {MyStr, Vals2(0)}, _ {MyStr, Vals2(1)}, _ {MyStr, Vals2(2)}, _ {MyStr, Vals2(3)}, _ {MyStr, Vals2(4)}, _ {MyStr, Vals2(5)}, _ {MyStr, Vals2(6)}} chart2.ChartData = Sales2 now in the chart column I have just "tuesday", and can't make mystr - 6 mystr - 5 mystr - 4 mystr - 3 etc.....
-
uf... other thing... the code make the formating working very well, but I can't use the timespan anymore ..for substract the days. this is my code: Dim d As Date = Date.Now() Dim ts As New TimeSpan Dim MyStr As String ts = ts.FromDays(7) '7 days MyStr = Format(d, "dddd, MMM d yyyy") ' d = d.Subtract(ts) 'Subtract the 7 days from the 'd' Date MsgBox(MyStr) the msgbox returns the format I whant but I can't use time substract because MyStr is now a string and cannot substract from string. I need something else ??
-
thanks Alex. Is a little hard to make app without msdn, and in a few days I will install the help. and the code you give me is ...PERFECT.
-
thanks thank you so much Alex.... :) is working now....days and months, but it is a way to change the time format? in my chart I have under evert line somthing like that: for months chart: 5/6/2003 6/6/2003 7/6/2003 ...etc... or.... for days chart: 9/30/2003 10/1/2003 ...etc... I whant if is possbile to display: for months : may 2003 june 2003 ..etc... and for days: monday tuersday ..etc... bye
-
I will try to make this by myself ...but I want to know if its possible before I will spend hours(or days) for that. Let's say that today is monday (19th). When I open the form with the chart control on it, the chart must have the last seven days with some values (values taken from a file...done that so is not a problem). So...the chart will have this data: tu 13th we 14th th 15th fr 16th sa 17th su 18th mo 19th if I open the chart on sunday ..the chart column data will be different with the last seven days.... thanks later edit : btw ...I tried to get current time and... get month get day and where I have the chart I put: month-5 month-4 month-3 month-2 month-1 month >> now... the same with day...but .... if today is 2th ...I think that the "-3" is not a correct day.... :)
-
done...thanks One more thing....how I make the refresh or a clear for a web control. Ex: I have two buttons and a web control. If I press a button a web page is loaded in web control.When I press the second button ..the old page is show for a couple of milliseconds until the second page is loaded. I want when I press the second button to make a clear for the web control.....it is possible ?? thanks I tried some tricks for nothing.....
-
hi. I have a user name and a password textbox's and after I put the password I whant to press enter key without preesing this button with the mouse. I a way...I whant to emulate the mouse pressing with the enter key.... but..I don't know how... I made the button with focus but it isn't work
-
hi. You will not going to belive that..but....now is working with a verry simple modification in my code. I replaced "Private Sub TabControl1_SelectedIndexChanged" with Private Sub TabControl1_click" behavior and now is working even if I put 0 ...weird anyway... but all the thanks...who knows when I will need your advice.
-
thanks , but I have some weird problems here... If I have: Private Sub TabControl1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TabControl1.SelectedIndexChanged If TabControl1.SelectedIndex = 1 Then web1.Navigate2("http://some url.") ElseIf TabControl1.SelectedIndex = 2 Then web1.Navigate2("http://some url.") End If End Sub ... Is working....when I change de second an thirth tab ..the url is changing there....but I need this to work on first tab and second , so I need the code below....right ??? Private Sub TabControl1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TabControl1.SelectedIndexChanged If TabControl1.SelectedIndex = 0 Then web1.Navigate2("http://some url.") ElseIf TabControl1.SelectedIndex = 1 Then web1.Navigate2("http://some url.") End If End Sub but with this code .... index 0 changed....etc... I ceive this error at compilation: An unhandled exception of type 'InvalidActiveXStateException' occurred in axinterop.shdocvw.dll what this means ??? thanks.
-
done.. so easy.....damn...
-
Hi . I have a small problem and I don't know how to resolve it. So...when I open my application I have a textbox and a button.I whant to enter to that textbox a parameter and tot put that parameter to the web control "navigate" ex: textbox = "ace" web1.navigate ("http://ww.someurl.com/entry.cgi?user= < textbox > ") some help here? thanks