|
myms.net wrote: 6.0.6001
This holds everything. There is a page in MSDN which reveals the meaning of the number. (I dont have the link right now but it does exists).
जय हिंद
|
|
|
|
|
d@nish's reply above prompted me to have a search for a way to do this without using the registry (nasty on vista especially). Came up with this quickie which could do with some work, but does the job.
public static string GetOSFriendlyName()
{
string result = string.Empty;
ManagementObjectSearcher searcher = new ManagementObjectSearcher("SELECT Caption FROM Win32_OperatingSystem");
foreach (ManagementObject os in searcher.Get())
{
result = os["Caption"].ToString();
break;
}
return result;
} [Edit] reguires a reference to System.Management and the same adding to your usings [/Edit]
[Edit2] Useful reference MSDN[^] [/Edit2]
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn) Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia) Why are you using VB6? Do you hate yourself? (Christian Graus)
|
|
|
|
|
This[^] is what I was speaking of.
जय हिंद
|
|
|
|
|
Scenario :
1. create a WinForms project
2. at run-time create another Form (with TitleBar) and set its Parent Property = MainForm
3. Note that you can drag the child Form around by the TitleBar and move most of it outside the Main Form's bounds. If you really "work" at it (and particularly if the child Form's FormBorderStyle is set to something like FixedToolWindow [and the child form's Text property is ""]), you can manage to get the Form so "virtually outside" the Parent's bounds that you can't recover mouse control drag-ability over the child form.
4. But in general, the end user cannot (and hopefully will not) move child forms so far outside the "bounds" they'll lose control over them.
All of which leads to this observation/question : it seems to me the design of behavior of child forms could have been to restrict their movements so all of their current visible area would remain within the bounds of the parent Form : or at least to have given the programmer the option of having them so restrained.
... edit #1 ... I meant to say that, to me, the fact that the child form will be automatically moved when the parent form is moved, keeping its relative position to the parent form's Top and Left properties : suggests that keeping the child form "in bounds" on a titlebar move would be ... uhhh ... kind of "congruent." ... /edit #1 ...
If the child form is moved by its TitleBar, you pretty well have to write a WndProc to keep its bounding rect inside the current parent Form bounding rect. And I have yet to find a "flicker free" way of doing that (but I'm working on it).
Curious what you think about this aspect of WinForm behavior.
And, while we're at it ... why have a separate 'SetParent method which duplicates the functionality of Form.Controls.Add(... someForm ...) ?
thank, Bill
"Many : not conversant with mathematical studies, imagine that because it [the Analytical Engine] is to give results in numerical notation, its processes must consequently be arithmetical, numerical, rather than algebraical and analytical. This is an error. The engine can arrange and combine numerical quantities as if they were letters or any other general symbols; and it fact it might bring out its results in algebraical notation, were provisions made accordingly." Ada, Countess Lovelace, 1844
|
|
|
|
|
Hi,
I need to send a mail when i click submit button.
in the mail body have to display data from text box.
and this text box having so many lines data... i used multiline = true
text box data like..
aaaaa
bbbbbb
ccccc
problem is that ...
when i receive the mail the text box data has displayed in single paragraph...
like..
aaaaa bbbbbb ccccc
here i used
msg.IsBodyHtml = true;
Thanks in Advance...
|
|
|
|
|
CRLF is ignored in HTML. You have to replace the newline characters in your text with HTML equivilent formatting, I think the tag is <BR>, before you put it in the body of the mail message.
|
|
|
|
|
Hi all,
my requirement is to display multiple envelopes in one word document
i can add only one envelope using following code
CODEDim Act As Microsoft.Office.Interop.Word.Envelope
Dim WordApp As New Microsoft.Office.Interop.Word.Application
AddHandler WordApp.Quit, AddressOf WordOnQuit
Dim Doc As Microsoft.Office.Interop.Word.Document = WordApp.Documents.Add
Act = Doc.Envelope
WordApp.Selection.TypeText("VB.NET Rocks")
Dim strAddr As String
Dim strReturnAddr As String
strAddr = "ADDR" & vbCr & "123 Skye St." & vbCr & "OurTown, WA 98107"
strReturnAddr = "retADDR" & vbCr & "456 Erde Lane" & vbCr & "OurTown, WA 98107"
Act.Insert2000(Address:=strAddr, ReturnAddress:=strReturnAddr, Size:="Size 10")
WordApp.Visible = True
i want to add more than one envelope in word doc
Thanks in advance
|
|
|
|
|
Hello folks,
There is a UserControl (MyUserControl) that contains a container control (MainGroupBox) on it's surface (Dock.Fill). The question is how to place controls on MainGroupBox when user drags them into the MyUserControl in Design mode. I marked MyUserControl with ParentControlDesigner attribute. Now it accepts controls but places them behind the MainGroupBox. I tried to remove controls from MyUserControl and place them into MainGroupBox on ControlAdded event, but it seems it doesn't help.
I tired in vain to solve the problem from last weekend
Does anyone know the solution? Any suggestions?
Thank you in advance.
Everything is possible!
|
|
|
|
|
Hmm... I think that I see work-around here.
We can tune z-index of MainGroupBox in order to show it behind all other controls like following:
private void CheckableGroupBox_ControlAdded(object sender, ControlEventArgs e)
{
gbMain.SendToBack();
}
But it is a trick, and controls' nesting is still wrong.
Everything is possible!
|
|
|
|
|
Dear All,
Am Using Epson BA-T500 printer. Manufacturer has provided a dll to print but its printing for arabic only question mark. but manufacturer has sent me a testing tool, its printing arabic correctly. I am coding in Vb.net 2005. so please let me know your ideas.
Thanks a lot
Regards
Azeem
|
|
|
|
|
If the printer is working with the test tool then look into your delivery of the data, make sure all the data is Nvarchar etc.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Its is not nvarchar but string.
I can able to display the arabic text in a message box
Regards
Azeem
|
|
|
|
|
[Edit #2]
Please see my reply to Henry Minute for a more detailed analysis of the behavior and a work-around.
[/Edit #2]
Hi,
[Edit #1]
Context : inside a SplitContainer SplitPanel (Panel1) is a Panel (the "Host Panel") which at run-time has other Panels added to it whose height and width may vary. The Host Panel has "Auto-Scroll" set to 'True.
[/Edit #1]
The Vertical Scrollbar appears okay when I put panels inside the Host Panel at run-time and the vertical space used exceeds the Host Panel's height.
But, the Horizontal Scrollbar just won't appear as expected when I put in Panels wider than the Host Panel's horizontal size.
I have tried explicit calls to set the HorizontalScroll Enabled and Visible properties in code with no success :
hostPanel.HorizontalScroll.Enabled = true;
hostPanel.HorizontalScroll.Visible = true; I did some Googling, and searching here on CP on this, and it looks like a few years ago some folks had some probem with the HScrollbar not showing up if the Panel was docked to an enclosing Form or other Container. Appears that a few years ago many people were having the problem of having the scrollbars on a panel show up when they wanted them hidden
I found this KB[^] at Microsoft :
"Article ID: 908536 - Last Review: August 29, 2007 - Revision: 2.2
The horizontal scroll bar that is used in forms may not respond to mouse controls or actions when you use themes on a Windows XP SP2-based computer"
But that's from 2007 : surely that issue is not still open now (?).
There's an old CP article that uses Interop API calls control Panel scrolling, but I don't want to go there, either.
So I tried every combination of Docking and Anchoring I could think of, including "None" for both Dock and Anchor properties. I tried it with the Panel set to have a very large Maximum size, and a Maximum size set to its initial size at design-time. No change in behavior. I also experimented with setting AutoScroll on the SplitContainer to True and False and observed no change on the Host Panel.
Appreciate any ideas.
thanks, Bill
"Many : not conversant with mathematical studies, imagine that because it [the Analytical Engine] is to give results in numerical notation, its processes must consequently be arithmetical, numerical, rather than algebraical and analytical. This is an error. The engine can arrange and combine numerical quantities as if they were letters or any other general symbols; and it fact it might bring out its results in algebraical notation, were provisions made accordingly." Ada, Countess Lovelace, 1844
modified on Monday, June 22, 2009 2:28 AM
|
|
|
|
|
Just a thought. Some time ago I had similar problems (which automagically resolved themselves when I wasn't looking). If I remember correctly my temporary solution involved setting the AutoscrollMargin. Have you tried that?
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Thanks, Henry,
Summary : turns out the problem was with the side-effects of using Dock = DockStyle.Fill on my Row Panels. Whether this is VS 2010 or me : don't know (my machine with VS 2008 is down). Fix turned out to be pretty easy : just manually set the tops of the Row Panel objects.
In fact I did play with both AutoScrollMargin and AutoScrollMinSize properties; tried setting them both 32,32, setting them both to 64,64, as well using them at their default values of 0,0 : no change in behavior in my panel.
So then I thought maybe the problem is related to the fact the Panel is being hosted inside a Panel of a SplitContainer. So I took the main panel out of the SplitContainer and put it directly on the form : same result.
So I set up a test program : no problem forcing horizontal scrollbars to appear with a Panel on the Form or inside one of the Panels of a SplitContainer !
Back to the drawing board : I discovered that what is suppressing the display of the Horizontal Scrollbar is setting the Dock property of the newly constructed Row Panel object (containing a bunch of Column Panel objects) to 'Top.
By taking out the call to set DockStyle to 'Top : the Horizontal scroll bar appears : of course then all the Row Panels appear on top of each other !
So I tried hard-coding setting the Row Panels height and width after using 'Dock, as well as before : no change. I experimented with many variations of setting Dock before and after adding the Row Panel object to the top-level container Panel, etc. No difference.
Seems like whenever I use Dock (followed by 'BringToFront) to cause correct vertical display of the Row Panel objects : it over-rides the width of the RowPanel object and sets it to the size of the container Panel.
Here's a hierarchy of what I am doing :
Outer Container Panel
Row Panel 1
Columm Panel 1
Column Panel 2
Row Panel 2
And so forth. Inside the Row Panel the Column Panels are docked Left.
best, Bill
"Many : not conversant with mathematical studies, imagine that because it [the Analytical Engine] is to give results in numerical notation, its processes must consequently be arithmetical, numerical, rather than algebraical and analytical. This is an error. The engine can arrange and combine numerical quantities as if they were letters or any other general symbols; and it fact it might bring out its results in algebraical notation, were provisions made accordingly." Ada, Countess Lovelace, 1844
|
|
|
|
|
Well, about a month ago I posted a question in this forum because I ran into a massive problem in my program. I had over a hundred icons in 2 toolStrips. And then out of nowhere, for no particular reason, I opened Vis. Studio the next day to find that all of those Icons had dissappeared. No errors while debugging or anything. I could still click where the Icons should've been, and the program would perform the specified task, but the icons were just gone. And it's just recently happened again.
In short. Atleast, In my situation, this was caused by duplicate resources. I have no idea how it happened. But I removed sll the resources and then re-added them again and all is fine.
jase.
P.S. I remember telling somebody that I would post my findings, but I couldn't find my original post so I decided to create a new one.
Yay! problem solved lol
|
|
|
|
|
Hello,
I am developing one desktop application using odbc with access database.
I am getting an error while executing following line.
SELECT ShipmentAdvice.AdviceNo, ShipmentAdvice.ContractNo,ShipmentAdvice.BuyContNo,ShipmentAdvice.Dt,ShipmentAdvice.PLoading,ShipmentAdvice.PDischarge,ShipmentAdvice.FDest,ShipmentAdvice.Ship_Code,ShipmentAdvice.ETA,ShipmentAdvice.ETD,ShipmentAdvice.Vessel,ShipmentAdvice.BlNo,ShipmentAdvice.Buyer,ShipmentAdvice.Supplier,ConditionMst.Con_Text
from ShipmentAdvice LEFT OUTER JOIN ConditionMst
ON ShipmentAdvice.Ship_Code=ConditionMst.Con_No ON ConditionMst.Mode='SHIP')
where AdviceNo='NI0901114_34'];
I am geeting error say "syntax error (missing operator) in query expression 'ShipmentAdvice.Ship_Code=ConditionMst.Con_No ON ConditionMst.Mode='SHIP'.
Please help me.
Thank you in advance.
|
|
|
|
|
This is a SQL problem and not in any way related to Windows Forms so you are in the wrong forum.
To debug SQL problems you execute the SQL statement in a Database Tool rather than from your program.
krinaljariwala wrote: I am developing one desktop application using odbc with access database.
Using Access is a poor decision. You should look into using SQL Express[^]
|
|
|
|
|
Thanks for yr suggestion , sorry i am in the wrong forum.
|
|
|
|
|
Hi all.
I am currently doing the following to load my data sources from DLL's.
I have a DLL with 3 datasets and various datatables and tableadapters. I get a list of these through the following
Dim Assem As Assembly = Assembly.LoadFile(AssemFilename)
Dim AssemTypes() As System.Type = Assem.GetTypes
Now I can create an Object to one of these tableadapters like this
Dim TAType As Type = Assem.GetType(t)
Dim TAObj As Object = Activator.CreateInstance(TAType)
and I can use that object to retrieve data from the database.
Dim result As Object = CallByName(Obj, "GetData", CallType.Method, Nothing)
My problem is, I want to know what commands (Fill, FillBySurname, FillByCode) etc are on the TableAdapter (TAObj Above). Or at least to get the SQL commands so that I can set any parameters required in the CALLBYNAME command above.
Many thanks for any assistance.
|
|
|
|
|
The Windows 7 RC Training Kit for Developers [^] has been released. This version of the training kit includes 10 presentations and 8 Hand-On-Labs, covering most of the Windows 7 light-up features as well as application compatibility topics.
|
|
|
|
|
Please can someone help.
I am trying to run an application on a machine that does not have Visual Studio 2008 installed.
I am getting an error message "This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix the problem."
I have installed the distributable libraries on this machine. I have compiled my code under release mode. Update the machine with all patches from Microsoft update as well.
I used the setup and deployment wizard too to see if that would solve my problem.
What else could I have missed?
Can someone please help.
|
|
|
|
|
Umm does the client machine have the .net framework installed (the proper version of it as well)?
|
|
|
|
|
Yes.
If this helps, it's just a plain dialog based application.
Being curious, I created an application using the wizard, and tried it on the machine. Same result.
|
|
|
|
|
Hi, This is manjari and im facing some problem to getting no of copies.i cant get the particular method to restrict the no of copies in printdialog.tell me the proper method which will restrict the no of copies .menas if a user will give 10 copies to print if that user hv limit for 9 copies then it should blocked.hw i will restrict plz help me.
thanks,
regards,
manjari.
How i will design a a form in windows service to print a document.
|
|
|
|
|