|
You could show that "Form" in the windows menu by programatically adding it to the menu via something like...
WindowsMenu.DropDownItems.Add("Whatever")
I am not sure you can get it to show up as part of your MdiWindowList but you can try with something like...
MenuStrip.MdiWindowListItem.DropDownItems.Add("Whatever")
In both cases you would have to handle the DropDownItemClicked event for that menu item programatically to set focus to the "Form" if that menu item was clicked. You would also want to delete the menu item programatically when the "Form" was closed.
|
|
|
|
|
|
That is such a large area of information you are most certainly not going to get a sensible satisfactory answer from a forum post. You should probably ask for references to C/S design material or recommendations for a good book(s). The desigh and arcitecture forum may also be a better place.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
AFAIK, Networking has NOTHING to do with MultiClient/Server application.
Your question is not clear at all.
Samir R. Ibrahim
|
|
|
|
|
mates,
need help again. how to load a calendar that will display two months.
Example: calendar1 will display February and calendar2 will display March then when i press a button it will display next two months
March - April , and so on. I've searched but no results.
If you could give me a samples or link, much appreciated.
thanks.
C# コードMicrosoft End User
2000-2008
「「「「「「「「「「「「「「「「「「「「「「「「「「「「
The best things in life are free
」」」」」」」」」」」」」」」」」」」」」」」」」」」」
|
|
|
|
|
So, which calendar control are you using?? Wouldn't it be easier just to use two instances of it and set the date to the month required in each instance?? How you do that depends on the Calendar control you're using.
|
|
|
|
|
thank you for youre reply.
actually i have the solution now. i did not use a calendar control anyway. i use MSFlexGrid. I made a custom calendar using that flexgrid.
but the same problem. i still cant able to display the second month on
the flexgrid but i can show the date for next month in a label for testing purposes.
Returns "2009/02"
Me.TitleMonth1 = Format(theDate, "yyyy" & JPY & " mm" & JPM & "")
Returns "03" , i need to return this as 2009/03
Me.TitleMonth2 = Format(Year(theDate), Month(theDate) + 1)
C# コードMicrosoft End User
2000-2008
「「「「「「「「「「「「「「「「「「「「「「「「「「「「
The best things in life are free
」」」」」」」」」」」」」」」」」」」」」」」」」」」」
|
|
|
|
|
C#Coudou wrote: i use MSFlexGrid. I made a custom calendar using that flexgrid.
but the same problem. i still cant able to display the second month on
the flexgrid
So what's wrong with using a second instance of your control??
C#Coudou wrote: Returns "2009/02"
Me.TitleMonth1 = Format(theDate, "yyyy" & JPY & " mm" & JPM & "")
Returns "03" , i need to return this as 2009/03
Me.TitleMonth2 = Format(Year(theDate), Month(theDate) + 1)
If you're stuck using VB6 (I do NOT recommend sticking with it since it's been a dead language for quite some time now), you may want to check into the FormatDateTime function.
|
|
|
|
|
Dave Kreskowiak wrote: So what's wrong with using a second instance of your control??
The second instance of my control will not display the correct month, it is always the same as the first instance. Every time i will click the button previous or button next.
Heres my part of code: Note my center date is '2009/02/26
PreviousBtn_Click()
m_lDate = DateAdd("m", -1, m_lDate) '2009/01/26
NextBtn_Click()
m_lDate = DateAdd("m", 1, m_lDate) '2009/03/26
Dave Kreskowiak wrote: If you're stuck using VB6 (I do NOT recommend sticking with it since it's been a dead language for quite some time now), you may want to check into the FormatDateTime function.
This is an old program , they want updates such as this calendar.
C# コードMicrosoft End User
2000-2008
「「「「「「「「「「「「「「「「「「「「「「「「「「「「
The best things in life are free
」」」」」」」」」」」」」」」」」」」」」」」」」」」」
|
|
|
|
|
Well, without knowing how m_lDate is defined and how your setting the date your control is supposed to be showing, there's very little I can tell you, other than you can instrument the code you have shown by outputting the value of m_lDate before and after those two DateAdd lines. I get the feeling that the code you posted has an On Error Resume Next above it and your completely ignoring any errors your code generates.
|
|
|
|
|
Dave Kreskowiak wrote: other than you can instrument the code you have shown by outputting the value of m_lDate before and after those two DateAdd lines.
This work great. Thank you so much for this idea. Now, the 2 calendars are working.
But i have another problem about the MSFlexgrid. The 2 calendars will compare to the my database. I have a HolidayTable and AccountTable. I put a pink color to my dates if the 2 calendars has the same date in my HolidayTable, this works fine. When I put a color green, red and yellow to my dates if the 2 calendars has the same date in my AccountTable. Here is the problem. I have 4 sql querries all. Now the MSFlexgrid is very very slow to open. I searched already but no results. Can you give me some idea again on how to optimize my msflexgrid. I already used the .Redraw
Heres the flow
With Msflexgrid1 --> Calendar1
4 queries
End With
With Msflexgrid2 --> Calendar2
4 queries
End with
All in all = 8 queries, thats why my it takes 20 secs minimum to load
C# コードMicrosoft End User
2000-2008
「「「「「「「「「「「「「「「「「「「「「「「「「「「「
The best things in life are free
」」」」」」」」」」」」」」」」」」」」」」」」」」」」
|
|
|
|
|
I need to know how to manage fingerprint reader through vb programming tool
caputre and comare etc..
|
|
|
|
|
You'll need the documentation and the SDK for the fingerprint reader. The .NET Framework does not have native support for interaction with such devices.
|
|
|
|
|
I have fingerprint reader and its driver.
I want to save the unique fingerprint id to database using vb code.
I need to know the reference to be added in vb project and appropriate dll
|
|
|
|
|
I hate repeating myself. You need the Software Development Kit and its documentation for that scanner. You get this from the manufacturer of the scanner.
arunram999 wrote: I need to know the reference to be added in vb project and appropriate dll
There isn't one that comes with Windows or VB6 or VB.NET and the .NET Framework. You need that SDK, which will have everything you need to talk to that scanner.
|
|
|
|
|
Hi All,
I have created a dataset which contains 50 records. I want to put the first 20 records in one datatable and the last 30 records into another datatable. I don't know how to do it. anyone has idea?
Thanks
Tin
|
|
|
|
|
tinmail wrote: I have created a dataset which contains 50 records.
Not true. A DataSet is a collection of DataTable objects, which are collections of DataRow objects. You have a DataSet, then contains a DataTable, which contains 50 records.
Are these 50 records generated by your code, or are they retrieved from a database?? If retrieved, the problem would be solved by running two queries against the database and have it dump each set on records into seperate DataTable objects. If generated, then it's easier to put the records in the correct table when they are generated, not after.
|
|
|
|
|
Thanks for your reply, Dave.
The dataset is retrieved from database. What I am trying to do is select the Top 50 records in database then show the top 20 into a datalist and the rest in another datalist. I know in SQL server doesn't have the "LIMIT" function. Thats why I don't know how to get those 30 records.
Thanks
Tin
|
|
|
|
|
2 easy options.
1 use a dataview for each datalist (not a control I know of) applying an appropriate rowfilter.
2 use the same rowfilters and user copytotable on the filtered dataview, then use the seperate tables for the datalist.
3rd one user linq to filter the datatable binding the resultset to the datalist - I seperate this as I have limited experience with linq.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
tinmail wrote: I know in SQL server doesn't have the "LIMIT" function.
Not really true.
You could create your dataset with 2 tables (like Dave referred to earlier):
DataSet Orders
Table (top 20 customers)
Table2 (bottom 30 customers).
You would then use a 'Select TOP' and an ORDER BY statement to order the records however you want (maybe combined with a group by) and do the fills.
Top 20 highest
Select top 20 *
From Customers
order by AR Balance
Bottom 30
Select top 30 *
From Customers
order by AR Balance desc
Personally, I would just fill one datatable and use a dataview to filter the rows vs filling two tables.
Any suggestions, ideas, or 'constructive criticism' are always welcome.
"There's no such thing as a stupid question, only stupid people." - Mr. Garrison
|
|
|
|
|
hi.
i have been programming for some time with this project here. and sorry. i cannot explain the full use of the project.
here are some of the code : and until now it almost fills 5500 lines.
- - - - -
kpar_holder20 = 0 : kpar_holder21 = 0 : kpar_holder22 = 0 : kpar_holder23 = 0
kpar_holder24 = 0 : kpar_holder25 = 0 : kpar_holder26 = 0 : kpar_holder27 = 0
kpar_holder28 = 0 : kpar_holder29 = 0 : kpar_holder30 = 0 : kpar_holder31 = 0
infbox1.Text = "calculations started"
shuf1 = CStr(TextBox1.Text)
Do While counter5 <= ant1 And CheckBox1.Checked = True
If CheckBox2.Checked = True Then
TextBox7.Text = counter5
End If
Call blandkort_to(shuf1) 'bland kortene
Call to_kind() 'check 2 of a kind OG low/high
Call uds_perc(ant1) 'udregner procent og skifter baggrundsfarve på procent tal.
counter5 = counter5 + 1
Loop
Call result1() 'udskriv resultat til skærm
infbox1.Text = "calculations stopped"
pt1.BackColor = Color.Red : pt2.BackColor = Color.Red : pt3.BackColor = Color.Red
pt4.BackColor = Color.Red : pt5.BackColor = Color.Red : pt6.BackColor = Color.Red
pt7.BackColor = Color.Red : pt8.BackColor = Color.Red : pt9.BackColor = Color.Red : pt10.BackColor = Color.Red
block_p1 = 1 : block_p2 = 1 : block_p3 = 1 : block_p4 = 1 : block_p5 = 1
block_p6 = 1 : block_p7 = 1 : block_p8 = 1 : block_p9 = 1 : block_p10 = 1
End Sub
Sub uds_perc(ByVal ant1) 'udregner procent og skifter baggrundsfarve på procent tal.
p1 = ((counter5 * 100) \ ant1)
If p1 >= 1 And p1 <= 10 And block_p1 = 1 Then
pt1.BackColor = Color.Green
block_p1 = 0
ElseIf p1 >= 11 And p1 <= 20 And block_p2 = 1 Then
pt2.BackColor = Color.Green
'MsgBox("alt ok") '' test command
block_p1 = 0
ElseIf p1 >= 21 And p1 <= 30 And block_p3 = 1 Then
=1= what i don't understand in this code here. is the line =
If CheckBox2.Checked = True Then
TextBox7.Text = counter5
End If
=1= the program do not print counter 5 to textbox.text. and i cannot see whats wrong in the code.
=2= the next i cannot see. is =
If p1 >= 1 And p1 <= 10 And block_p1 = 1 Then
pt1.BackColor = Color.Green
block_p1 = 0
=2= it will not change the backcolor on pt1.
- - - - -
hope anybody can see an error i cannot see.
and i know there are some calls. but they are in the same for. so everything is happening in the same form.
the variables used in this here is :
Public kpar, kpar2, kpar3, kpar4, kpar5, kpar6, kpar7, kpar8, kpar9, kpar10, kpar11 As Integer
Public kpar_holder, kpar_holder1, kpar_holder2, kpar_holder3, kpar_holder4, kpar_holder5, kpar_holder6, kpar_holder7, kpar_holder8, kpar_holder9, kpar_holder10 As Integer
Public kpar12, kpar13, kpar14, kpar15 As Integer
Public kpar16, kpar17, kpar18, kpar19 As Integer
Public kpar20, kpar21, kpar22, kpar23 As Integer
Public kpar24, kpar25, kpar26, kpar27 As Integer
Public kpar28, kpar29, kpar30, kpar31 As Integer
Public kpar_holder12, kpar_holder13, kpar_holder14, kpar_holder15 As Integer
Public kpar_holder16, kpar_holder17, kpar_holder18, kpar_holder19 As Integer
Public kpar_holder20, kpar_holder21, kpar_holder22, kpar_holder23 As Integer
Public kpar_holder24, kpar_holder25, kpar_holder26, kpar_holder27 As Integer
Public kpar_holder28, kpar_holder29, kpar_holder30, kpar_holder31 As Integer
Public shuf1, counter5, p1 As Integer
Public block_p1, block_p2, block_p3, block_p4, block_p5 As Integer
Public block_p6, block_p7, block_p8, block_p9, block_p10 As Integer
and
Dim ant1 As Integer
- - - - -
thz.
modified on Wednesday, February 25, 2009 6:55 AM
|
|
|
|
|
The code is not readable at all, use the code tag. Can you just post the relevant section of the problem only?
|
|
|
|
|
I can barely read this, and frankly, poorly written.
The reason why you don't see the updates is because your code is blocking the WM_PAINT messages being sent to your controls so they can repaint themselves according to the new Text and BackColor properties. When you make a change to a control, you do not see the change until the UI thread (which is running more of your code) gets a chance to process any pending messages in your applications message pump. This includes getting around to processing WM_PAINT messages triggered by the changes you made to your controls, pt1 and TextBoxY.
To get around this and keep your UI thread available, you would normally move all of your processing code to a background thread and raise events or use some other communication scheme to tell the UI thread how to updates the controls. But, seeing as how your pretty much a beginner at writing code, this concept may be way beyond your coding abilities for now.
|
|
|
|
|
hi.
and thz for the reply.
i found a simple solution.
just added the command :
update()
|
|
|
|
|
Yeah, that works. But, when your forms get more complicated, you'll find that using Update can cause you some unwanted side-effects. Just keep a heads up...
|
|
|
|
|