|
Hi @ all,
I want to copy the contents of a richTextBox to another without loosing the text styles.
richTextBox1.Text = richTextBox2.Text // copies the text contents without the styles
or is there any option to set or an other additional store to keep the styles with the text ?
Thank in advance
Frank
|
|
|
|
|
I haven't tried this, but from the docs it looks like if you do
richTextBox1.Rtf = richTextBox2.Rtf;
that will do what you want. The .Rtf is supposed to contain the text, including the RTF formatting codes.
|
|
|
|
|
I want to update a Jet 4.0 database using databound textboxes. I was trying to find some examples of how to do this on the Net, but all of the examples that I could find were using datagrids. Does anyone know of a online example that updates a Jet database using databound textboxes. I am using a OleDbDataAdapter.
Thanks.
|
|
|
|
|
There is no difference weather you use textbox's or datagrid's. Both are just a method of displaying and editing data. The updating is done by the DataAdapter.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
lets say i have tabpages with lots of textboxes on each page. (winform)
is there a shoort way to empty all textboxes on each page?
|
|
|
|
|
I use code like the following to set control's to their default values. You can either pass in the tab page to the function or modify it slightly and pass in the tab control and step through the control's pages.
private void ClearTextBoxes (Control parentControl)
{
// Step through each control in the parent control and clear it's text if a textbox
foreach (Control control in parentControl.Controls)
{
if (control is System.Windows.Forms.TextBox)
control.Text = string.Empty;
}
}
This method has the added advantage that you can also default check boxes' and other controls' properties by adding an additional if (control is [control type]) statement in the for loop.
Hope this helps
Aaron
|
|
|
|
|
|
Hi
I have created a Windows Forms app that calls another external exe to achieve some functionality.
So now i have two exe files :-
1. Created by Windows Forms (.Net)
2. The exe being called by my app
How can i make a winforms app that includes the external exe as part of my application so that i have to finally give/install one exe on the machine.
thanks..
rt7
|
|
|
|
|
You could put the second .EXE as a resource into your primary .EXE. But! You still have to unpack it and put it back into a file on the hard rive to use it.
Bottom line is, you can't, unless you rewrite the second .EXE functionality into your primary app.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I thought I was going crazy or just a really bad programmer but its my server(localhost). Every time I try and use a dropdownbox or listbox to select a value and use it, it always uses the '0' index of the select box on post back. I tried running the Microsoft example of selected value and i get the same result... on the MS example... when i hit submit it always returns 1 no matter what i hit... anyone know what my problem is... here is the example straight from the MSDN library..
<code>
<!-- The following example demonstrates how to select items in a TextBox.
If the item is found in the text box, the item is selected and a message is
displayed stating the name of the selected item. If the item is not found,
no item is selected and a message is displayed stating that the item was not
found. -->
<%@ Page Language="C#" AutoEventWireup="True" %>
<html>
<head>
<script runat="server">
void Button_Click(Object sender, EventArgs e)
{
// Perform this operation in a try-catch block in case the item is not found.
try
{
List.SelectedValue = ItemTextBox.Text;
MessageLabel.Text = "You selected " + List.SelectedValue + ".";
}
catch (Exception ex)
{
List.SelectedValue = null;
MessageLabel.Text = "Item not found in ListBox control.";
}
}
</script>
</head>
<body>
<form runat="server">
<h3> ListControl SelectedValue Example </h3>
<asp:ListBox ID="List"
runat="server">
<asp:ListItem>Item 1</asp:ListItem>
<asp:ListItem>Item 2</asp:ListItem>
<asp:ListItem>Item 3</asp:ListItem>
<asp:ListItem>Item 4</asp:ListItem>
</asp:ListBox>
<hr>
Enter the value of the item to select: <br>
<asp:TextBox ID="ItemTextBox"
MaxLength="6"
Text="Item 1"
runat="server"/>
<asp:Button ID="SelectButton"
Text="Select Item"
OnClick="Button_Click"
runat="server"/>
<br><br>
<asp:Label ID="MessageLabel"
runat="server"/>
</form>
</body>
</html>
</code>
|
|
|
|
|
i'm running XP Professional SP1 and asp.net 1.1 if that helps
|
|
|
|
|
|
Hi there,
I'm meeting RegEx's for the first time and have a simple question: I'd like to allow aphanumeric chars and any digits in my Validator and thus came up with: \w+\d* . Furthermore I'd like to say in my expression that the minimum length of the whole thing must be 4 (in any combination) and that the alphanumeric characters can be at any position in the string.
How do I do that?
Thanks in advance,
Matthias
I love deadlines. I like the whooshing sound they make as they fly by. [Douglas Adams]
|
|
|
|
|
|
I'm developing an application that works with parallel threads, and I need my users to now that the app is working. So, how I make a blinking notify icon.
|
|
|
|
|
|
This is about c# .net compact framework problem.
I want to change a jpg file in the pocket pc 2002 emulator to
be a byte array and then pass it via web service for furhter
processing.
I use the FileStream codes to convert the jpg to byte array
as below, when an button onclick event. As FileStream is
supported by .net compact framework.
string strFullPath = @"\\Program Files\myApp\a.jpg"; // this
is a file that must exist in above emulator folder.
ln1: FileStream oImg = new FileStream
(strFullPath,FileMode.Open,FileAccess.Read);
ln2: BinaryReader oBinaryReader = new BinaryReader(oImg);
ln3: byte[] oImgByteArray = oBinaryReader.ReadBytes((int)
oImg.Length);
ln4: oBinaryReader.Close();
ln5: oImg.Close();
However, every time when running ln1, IO exception occured
and the emulator display error message "A device with the
same name is already on the network. Tap Start > Settings >
System tab > About > Device ID tab, change your device name,
and try again"
Any idea?
Thanks much!!!
Rene Xavier
|
|
|
|
|
Hello all,
Consider the following scenario:
We run a website (intranet) on W2K/IIS5. Ve validate userrights by comparing usergroups from NT against internal validation. Now we have to move to W2003 with NT, but we have no budget to alter the Intranet. Does anybody know how we:
Can have one component get the groups from NT aswell as AD?
Point us in the direction of some usefull samples that deal with this problem?
So far, all my searches was either an NT solution, or AD, and they would never mix
Thank you for taking the time to think with me on this,
Gerwin Postma
|
|
|
|
|
Hello,
I am doing a very simple web service and keep getting this error message. I have tried doing the hello world example as well by uncommeting the code, but this get the same message. I then tried doing a repair of my visual studio .Net thinking there was a problem with that, but still get the same error message. I cannot do any web services because of this. Can anyone help me?
The message l get is below.
Server Error in '/foodService' Application.
--------------------------------------------------------------------------------
The resource cannot be found.
Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly.
Requested Url: /foodService/Service1.asmx
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.1.4322.2032; ASP.NET Version:1.1.4322.2032
Thanks for your help in advance,
Steve
|
|
|
|
|
|
Hi there!!
I need to create a bitmap from a sequence of a movie.
What i need to do is to take the first column of each frame and to build a bitmap just to show it in a panel.
It is possible to do this without constructing a Bitmap file.
How can I do this?!!
Thanks very much
|
|
|
|
|
I suggest you look into the Windows Media SDK, as well as DirectShow. Both will have the capability to capture a frame of a movie as a bitmap, without having to construct a bitmap file on disk.
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: He has a funny face. And he's my son.
Judah Himango
|
|
|
|
|
Hi, how can I save an object in sqlserver by serialization without make a file in hard drive?
I wanto save it into an image datatype fild.
Thank you.
La realidad no es más que impulsos eléctricos del cerebro - Morpheus
|
|
|
|
|
You could use System.Runtime.Serialization.Formatters.Binary.BinaryFormatter to format your object into a stream. From the stream, you can get the byte[] making up the object. You are then free to write the byte[] to an image column in a SQL database.
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: He has a funny face. And he's my son.
Judah Himango
|
|
|
|
|
ok, but how can I know what capacity I need to use in the buffer (byte[])
Please write a code sample.
Thank you again!
La realidad no es más que impulsos eléctricos del cerebro - Morpheus
|
|
|
|