|
Why on earth are you using this architecture? It's just plain daft.
If you need a control, you should write it as an ASP.NET control - they are very easy to write - and more importantly they sit neatly in the whole HTTP pipeline, so they can easily raise events that the host can interact with.
|
|
|
|
|
I am trying to get the position of the scoll bar in a rich text box.
I am calling the following method:
[DllImport("user32")] public static extern int GetScrollPos(IntPtr hwnd, int nBar) ;
Like this:
public const int SB_VERT = 1;
int pos = GetScrollPos(rtb.Handle, SB_VERT);
where rtb is a RichTextBox
If the form containing the rich text box does not have focus, this gives me the scroll position accurately. If the form does have focus, it gives me an inaccurate result. For example, if I scroll to the top of the rtb, and the form does not have focus, this returns 0.
But if the form has focus, this always returns a value which indicates the rtb is scrolled to the bottom (regardless of where the scroll actually is).
Anyone know why this happens, or how to work around it?
Thanks
|
|
|
|
|
hello every body
iam looking for J# statement equivlant to this C# one
datagridview1[j,i].Value
where j,i are the row and coulmn indexes
thanks in advance
|
|
|
|
|
mr.me wrote: iam looking for J# statement equivlant to this C# one
You are looking for it?
Get a beginners book or take a university course.
led mike
|
|
|
|
|
You do know that J# is a dead product, right? MS will support it until 2015(?), but there will be no further development on the language and you won't see it in future versions of the .NET Framework or Visual Studio.
|
|
|
|
|
Dave Kreskowiak wrote: do know that J# is a dead product
Yep, and never even bothered to look at it
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
|
|
|
|
|
Hi,
AFAIK Java uses the array-of-array notation, as in arr[i][j] .
And IIRC they don't have indexers nor properties: in your statement, datagridview1
is presumably a DGV, not an array, but the indexer capabilities of C# allow you
to access its internal data as if the object itself were an array.
And properties represent code (a getter and/or setter method) that shows up as if
it were a data member.
So in the end you may well end up writing something like datagridview1.GetValue(i,j)
for a class that then needs to have a GetValue() method.
Luc Pattyn [Forum Guidelines] [My Articles]
This month's tips:
- before you ask a question here, search CodeProject, then Google;
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get;
- use PRE tags to preserve formatting when showing multi-line code snippets.
|
|
|
|
|
Dear all,
Here iam working on windows based application.
Requirement:
Under one button click i need search all the drives(Folders under drives also) for a file type(eg;.jpg,.mp3)
Can you please help me out with some code. or some
Proper way to approach. Its very urgent please....
Thanks in advance.
suresh.
Sursh
|
|
|
|
|
premsuri wrote: Its very urgent please....
It's always urgent. Oh wait, you've got for full stops. That makes all the difference.
Write a recursive function to walk the directory structure - it's not hard.
|
|
|
|
|
and of course that recursive function looks like :
<br />
private void LoopFolders(DirectoryInfo myFolder)<br />
{<br />
if ((myFolder != null) && (myFolder.Exists))<br />
{<br />
foreach (DirectoryInfo mySubFolder in myFolder.GetDirectories())<br />
{<br />
Console.WriteLine(mySubFolder.Name);<br />
LoopFolders(mySubFolder);<br />
}<br />
}<br />
}<br />
in case you didn't figure that out yet
|
|
|
|
|
I have created a computer program that the user will download. Is there anyway to make money off of the program without charging for the program (advertising, etc).
Thanks!
|
|
|
|
|
Not really, no. Advertising doesn't pay much and users hate it. Unless you wrote the next Napster ( in terms of being something everyone will want ), I'd say forget it.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
They could download the app free but pay you for source.
|
|
|
|
|
Source? What does that mean? (Its not Open source, is it?)
|
|
|
|
|
If your app requires internet access, you could add a WebBrowser control and get some Goolge AdWords there. You wouldn't get a lot of money, but something is better than nothing.
|
|
|
|
|
I began with a textbook Form example (Petzold's Directory TreeView Form)that uses icon resources and modified/experimented with it to begin the C# learning process.
There are icon resource files used in the project and they have their property "Build Action" set to "Embedded Resource". My attempts at placing the icons in their own folder failed. It seems they must be in the solution's root directory? I suspect this observation is because: "I don't know diddly yet!"
I am now trying to transform my modified Petzold code into a DLL. I need to learn how to wrap up the resources so that they are contained in the DLL.
I've been able to create and use the DLL ... but only when I "copy" the icon resource files into the \bin\release directory.
What are the steps I should take so that the resources become a part of the single *.dll file?
When I double click the "Properties" folder in the SolutionExplorer and then select "Resources" ... I am prompted to create a default resources file. Here I can add Icon files and text files. Awesome if that was all that was needed to have the resources become part of the DLL file!! But my DLL does not "find" those resources. Again, I seem to have to copy them into the \bin\release directory for them to be found.
Please teach me or point me towards a good tutorial or textbook that covers the usage of resources in a DLL.
Thanks for all help and suggestions.
-- Tom
|
|
|
|
|
If you add a resource file controled by .net you can access the images in code using the resource file name. For example if you add an image (MyImage.jpg) to a resource file (MyResources.resx) you will be able to access it like below (check your compiler warnings and click enable strongly typed resources if you see it).
Image myImage = MyResource.MyImage;
However, I suspect you may be having problems with the namespaces of your code. To access resources you must correctly know the namespace. You can embed resources just like you mentioned by changing the build options in properties. If you do this you would need to do the following to access the image. Note that the resource name includes the full namespace which will by default include any sub folders used to store the image.
Assembly assemblyExecuting;<br />
Stream streamImage;<br />
Image imageMine<br />
<br />
assemblyExecuting = Assembly.GetExecutingAssembly();<br />
streamImage = assemblyExecuting.GetManifestResourceStream("MyNameSpace.Folder.FileName.jpg");<br />
imageMine = Image.FromStream(streamImage);<br />
streamImage.Close();
|
|
|
|
|
hi
can any body help me how to populate a DGV combobox column with datas from a datatable.
<br />
DataGridViewComboBoxColumn comboboxColumn; <br />
comboboxColumn = _createComboBoxColumn();<br />
comboboxColumn.HeaderText = "Item";<br />
dataGridView1.Columns.Insert(0, comboboxColumn);<br />
<br />
BindingSource s = new BindingSource();<br />
s=dtItem.Columns["Item"].ToString();<br />
comboboxColumn.DataSource = s;<br />
<br />
thank you in advance
ssk
senthil
|
|
|
|
|
you should try it by creating a DataTable Object which can be databound().
|
|
|
|
|
Hi Experts
I want to share MSDN in LAN so that othere client syetem can access it without installing on there systms (same like accessing iis site in workgroup from server to client). Can any budy tell me how to do that ?
The Stifler
--
Bugs can neither be created nor be removed from software by a developer. They can only be converted from one form to another. The total number of bugs in the software always remain constant.
|
|
|
|
|
Hi, how i can save the data in my datatable or dataset or datagrid into a
excel file?
thanks
|
|
|
|
|
|
The code of WMSplitter studied:
the Input pin read data by StreamOnAsyncReader::Read,which is derived from IStream,
then sample is sent to the Output pines by WMFDemuxFilter::OnStreamSample,which is derived from IWMReaderCallbackAdvanced and IWMReaderCallback.
I don't know what things being done during the data from IStream::Read to IWMReaderCallbackAdvanced::OnStreamSample.
Can I debug it step by step?
Hi,Markliu-codeproject
|
|
|
|
|
hi,
I have one MDI form which has one webbrowser control.
Now I load/show a new form which is MDI's child form.
i.e.
Dim frmDetail as New FrmScreenDetails()
frmDetail.MdiParent = Me
frmDetail.Show()
Now what happens is my child form (frmDetail) is sent back because of my webbrowser control i.e. resides on MDI form.
Can we have something like my child form displays topmost compare to MDI's controls?
Thank You
|
|
|
|
|
frmDetail.Show()
Try frmDetail.ShowDialog()
- Stop thinking in terms of limitations and start thinking in terms of possibilities -
|
|
|
|