|
|
The word is not in the form of smooth throughout, with the following code:
private void Form1_Load(object sender, EventArgs e)
{
label1.ForeColor = Color.Violet;
label1.Text = "From trong suốt";
label2.ForeColor = Color.BlueViolet;
label1.Text = "Màu chữ của form";
label3.ForeColor = Color.DarkOrange;
label1.Text = "Màu chữ của form";
this.TransparencyKey = Color.Wheat;
this.BackColor = Color.Wheat;
}
why not borrow the word transparent form? way to overcome this is not the case? image link: http://freakshare.com/files/1lh6461j/formtran.jpg.html
|
|
|
|
|
I have absolutely no idea what you're talking about. "Word is not smooth"?? You haven't given use any kind of context for this problem, like what you're trying to do.
I'm not clicking on a "FreakShare" link. That place has a history, and not a good one.
|
|
|
|
|
Yes, I'm not sure I'd like to be asked that as an interview question...
Regards,
Rob Philpott.
|
|
|
|
|
Member 2458467 wrote: The word is not in the form of smooth throughout The picture isn't visible; there are plenty of hosts that allow the display of a picture without the need to download it.
The characters will always be drawn one at a time - it's not handwriting where one letter flows into the other. If you're talking about a pixelated word that needs smoothing, then you're looking for what's called "aliassing".
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Hi,
Is any way to manage multiple snap shots in single vm using Vestris.VMWareLib in c#.
Regards
Biju
|
|
|
|
|
Wouldn't this question be more appropriate on the VMware forums?? The chances of you finding someone who has experience with this are far FAR greater over there.
|
|
|
|
|
Check if any of their documentation can help you out.
|
|
|
|
|
Hi,
I have a Windows 8 App , which calls to Twitter via Azure Mobile Service. Intially I was able to get the user's json information ( Name and Profile picture ) by passsing the ID to the following URL:
https://api.twitter.com/users/
However with the change of twitter API 1.1 this doesnot work. I am able to login but unable to retreive the user information in JSON format.
Please help me getting the correct signature in C# in the following format.
https://api.twitter.com/........................................................
I have the following data with me:
User ID
oauth Token
Consumer Key
Consumer Secret
I would need the output in a URL format which when I put in my browser returns the user information in JSON format. I tried refering https://dev.twitter.com/docs/auth/creating-signature but I am unable to get it in URL format.
Your help will be highly appreciated.
|
|
|
|
|
This is not a C# question; you should be asking this at the Twitter developer site.
Veni, vidi, abiit domum
|
|
|
|
|
Hello,
I am trying understand for what is IServiceProvider. I readed some basic information about that by I dont have idea for what is it good and usefull.
Does someone know some easy example for understand of that?
Thank you very much
|
|
|
|
|
Its typically used by design-time code to get designer services, like the IComponentChanged service or the IWindowsFormsEditorService. Basically it provides an interface for an object to obtain services from another part of the application.
The only time you (almost always) use this is during development of design-time rich controls. For example if you want to add custom property designers to the property grid, you would create a UITypeEditor for your property and override some of the methods, as in this example[^].
|
|
|
|
|
I tried to capture webcam video into a mp4 file using the following code.
void preview(int deviceNo, string filename)
{
try
{
capture = new Capture(filters.VideoInputDevices[deviceNo], filters.AudioInputDevices[0]);
//capture.FrameSize = new Size(320, 240);
//capture.FrameRate = 30;
//capture.VideoCompressor = filters.VideoCompressors[0];
//capture.AudioCompressor = filters.AudioCompressors[0];
capture.FrameRate = 29.997; // NTSC
capture.FrameSize = new Size( 320, 240 ); // 640x480
capture.AudioSamplingRate = 44100; // 44.1 kHz
//capture.AudioSampleSize = 16; // 16-bit
//capture.AudioChannels = 1; // Mono
// capture.Filename = "C:\MyVideo.avi";
capture.PreviewWindow = panel1;
if (btnStartVideoCapture.Text == "STOP")
{
counter++;
if (!capture.Cued) capture.Filename = filename + ".mp4";
capture.Cue();
}
capture.Start();
panel1.Visible = false;
}
catch {}
}
/*============================================================================*/
private void btnStartVideoCapture_Click(object sender, EventArgs e)
{
startOrStopCapturing(capture,filename);
}
/*============================================================================*/
void startOrStopCapturing(Capture capture, string filename)
{
btnStartVideoCapture.Visible = false;
if (capture != null) capture.Stop();
if (timer.Enabled) timer.Stop();
if (btnStartVideoCapture.Text == "START")
{
btnStartVideoCapture.Text = "STOP";
btnStartVideoCapture.BackColor = Color.Maroon;
panel1.Visible = true;
try
{
if (!capture.Cued) capture.Filename = filename + ".mp4";
capture.Cue();
capture.Start();
timer.Start();
}
catch (Exception ex)
{
MessageBox.Show("Error Message: \n\n" + ex.Message);
}
}
else
{
btnStartVideoCapture.Text = "START";
btnStartVideoCapture.BackColor = Color.DarkSlateBlue;
panel1.Visible = false;
}
btnStartVideoCapture.Visible = true;
}
although the file is saved as mp4, but android still cannot play it. When I open meta info of the file, it is still an avi format file. Does anyone know how to save it as a mp4 file?
Here is the info of the file save as mp4 extension but has avi format
General
Complete name : C:\Recorder\bin\Debug\test.mp4
Format : AVI
Format/Info : Audio Video Interleave
File size : 2.62 MiB
Duration : 9s 72ms
Overall bit rate : 2 422 Kbps
Video
ID : 0
Format : Cinepack
Codec ID : cvid
Duration : 7s 533ms
Bit rate : 1 889 Kbps
Width : 320 pixels
Height : 240 pixels
Display aspect ratio : 4:3
Frame rate : 30.000 fps
Bits/(Pixel*Frame) : 0.820
Stream size : 1.70 MiB (65%)
Audio
ID : 1
Format : ADPCM
Format profile : A-Law
Codec ID : 6
Codec ID/Hint : CCITT
Duration : 9s 72ms
Bit rate mode : Constant
Bit rate : 705.6 Kbps
Channel(s) : 2 channels
Sampling rate : 44.1 KHz
Bit depth : 8 bits
Stream size : 781 KiB (29%)
Interleave, duration : 204 ms (6.11 video frames)
Interleave, preload duration : 500 ms
Thanks,
Peter
|
|
|
|
|
Just replacing an extension of a file does not at all cause a format conversion.
Why did you comment those lines out:
I do not know where exactly you have to set the format you want to get instead of the default format, but that looks like a good place.
|
|
|
|
|
Hi,
I have a word file with a specific format, i want to insert name,address and some other values into that format.
Can i do that using c# ? if yes, how ??
Please suggest a solution
Thanks
|
|
|
|
|
There are many resources here on CodeProject for inter-operating with Microsoft Word. Just search for terms like "Word Automation," "Microsoft Word," etc.
You could make your question much more specific, and describe what you've done so far.
Google CEO, Erich Schmidt: "I keep asking for a product called Serendipity. This product would have access to everything ever written or recorded, know everything the user ever worked on and saved to his or her personal hard drive, and know a whole lot about the user's tastes, friends and predilections." 2004, USA Today interview
|
|
|
|
|
I suggest you put bookmarks in the source document and then insert the text into the relevant bookmarks
=========================================================
I'm an optoholic - my glass is always half full of vodka.
=========================================================
|
|
|
|
|
Well, Could you tell me your specific word file format? Without that, nobody can insert it.
|
|
|
|
|
Hi,
Its some contract agreement with the header , picture and some other agreement details. I need to fill the Customer Name, Date and address from the database.
I already tried the find and replace codes, but since that document has to be reused , finding and replacing text wont solve the problem.
Is there any way i can create an object from one existing document and save it in another name with the replaced texts ?
|
|
|
|
|
Sandeepdshenoy wrote: Is there any way i can create an object from one existing document and save it in another name with the replaced texts ?
Use File.Copy.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Hi,
This is what i have done till now...
var myWord = new Microsoft.Office.Interop.Word.Application();
var myDoc = new Microsoft.Office.Interop.Word.Document();
object missing = System.Type.Missing;
try
{
object FileName = @"D:\Declaration.docx";
myDoc = myWord.Documents.Open(ref FileName,
ref missing, ref missing, ref missing, ref missing,
ref missing, ref missing, ref missing, ref missing,
ref missing, ref missing, ref missing, ref missing,
ref missing, ref missing, ref missing);
myDoc.Activate();
foreach (Microsoft.Office.Interop.Word.Range tempRange in myDoc.StoryRanges)
{
tempRange.Find.Text = "@DonorName";
tempRange.Find.Replacement.Text = "Sandeep D Shenoy";
object replaceAll = Microsoft.Office.Interop.Word.WdReplace.wdReplaceAll;
tempRange.Find.Wrap = Microsoft.Office.Interop.Word.WdFindWrap.wdFindContinue;
tempRange.Find.Execute(ref missing, ref missing, ref missing,
ref missing, ref missing, ref missing, ref missing,
ref missing, ref missing, ref missing, ref replaceAll,
ref missing, ref missing, ref missing, ref missing);
tempRange.Find.Text = "@Date";
tempRange.Find.Replacement.Text = "01-01-2013";
tempRange.Find.Wrap = Microsoft.Office.Interop.Word.WdFindWrap.wdFindContinue;
tempRange.Find.Execute(ref missing, ref missing, ref missing,
ref missing, ref missing, ref missing, ref missing,
ref missing, ref missing, ref missing, ref replaceAll,
ref missing, ref missing, ref missing, ref missing);
tempRange.Find.Text = "@Telephone";
tempRange.Find.Replacement.Text = "1234567890";
tempRange.Find.Wrap = Microsoft.Office.Interop.Word.WdFindWrap.wdFindContinue;
tempRange.Find.Execute(ref missing, ref missing, ref missing,
ref missing, ref missing, ref missing, ref missing,
ref missing, ref missing, ref missing, ref replaceAll,
ref missing, ref missing, ref missing, ref missing);
tempRange.Find.Text = "@Email";
tempRange.Find.Replacement.Text = "abd@gmail.com";
tempRange.Find.Wrap = Microsoft.Office.Interop.Word.WdFindWrap.wdFindContinue;
tempRange.Find.Execute(ref missing, ref missing, ref missing,
ref missing, ref missing, ref missing, ref missing,
ref missing, ref missing, ref missing, ref replaceAll,
ref missing, ref missing, ref missing, ref missing);
}
myDoc.Save();
myDoc.Close(ref missing, ref missing, ref missing);
myWord.Application.Quit(ref missing, ref missing, ref missing);
}
catch (Exception ee)
{
myDoc.Close(ref missing, ref missing, ref missing);
myWord.Application.Quit(ref missing, ref missing, ref missing);
}
I replaced 4 Texts from the document and replaced it with values, but this document has to be reused many times. So is there any way to bypass that ?
|
|
|
|
|
|
Hi ,
I have a windows application developed in dot net 3.5 framework where i am importing and exporting data to excel.I am using Microsoft Office interop excel and have added the version 14.0 as reference to my application. When i run this application on a machine having Office 2007 ( version 12.0) my application does not work. My question is why is it having this issue and why am i getting an exception 14.0 could not loaded
|
|
|
|
|
The interop libraries are different between 12 - and 14, hint that is why they have versions!
There is a reason we NEVER, EVER, under ANY circumstances use Office products in any of our solutions. MS has no compunction breaking systems going forward let alone backwards compatibility.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
I though you could include the Dll that will make an Excel file in your solution, so regardless of wheter or not you had Excel install, it would create the file, or?
|
|
|
|
|